# name : CI of prop diff (strata)
# key : freq.prop.diff.ci.weight
# contributor: Shuguang Sun
# --
** MN is almost equal expressions in Farrington and Manning;
** Newcombe is recommended by Fagerland2011 recom_confid_inter_for_two;
** MN is recommended by Nurminen2009 score_inter_for_differ_of;
ods output PdiffCLs=${5:pdiffci};
ods output commonpdiff=${6:commonpdiff} (keep=column method value stderr lowercl uppercl);
proc freq data=${1:dtin};
table $0${4:stra} * ${2:trt} * ${3:resp} / riskdiff(cl=${5:$$(yas-choose-value '("WALD" "MN" "WILSON" "AC" "HA" "(WALD MN WILSON AC HA)" "WALD(CORRECT)" "MN(CORRECT=NO)" "AGRESTICAFFO" "EXACT" "SCORE(CORRECT=NO)" "NEWCOMBE" "NEWCOMBE(CORRECT)"))}${6: common});
weight count;
run;
